package com.xiaoxin.suma.net;

import android.util.Log;

import com.blankj.utilcode.util.ToastUtils;
import com.google.gson.JsonSyntaxException;

import retrofit2.adapter.rxjava.HttpException;

/**
 * Created by ljm on 2017/4/12.
 */

public class ErrUtils {
    public static final String TAG = "ErrUtils";

    public static void pase(Throwable e) {
        Log.e(TAG, "pase: ", e);
        if (e instanceof HttpException) {
            HttpException httpException = (HttpException) e;
            try {

            } catch (JsonSyntaxException j) {
                j.printStackTrace();
                ToastUtils.showShortSafe("你的网络不给力，请稍后再试");

            }
        } else {
            e.printStackTrace();
        }
    }
}
